home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 3
/
ct-rom iiib.zip
/
ct-rom iiib
/
WINDOWS
/
DIVERSEN
/
WINE02BX
/
C-MODE.ELC
< prev
next >
Wrap
Text File
|
1993-03-28
|
14KB
|
141 lines
;;; compiled by @win386 on Sat Mar 13 14:30:32 1993
;;; from file c:/src/lucid-19.4/lisp/modes/c-mode.el
;;; emacs version 19.3 Lucid.
;;; bytecomp version 2.08; 27-aug-92.
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs18.
(if (and (boundp 'emacs-version)
(or (and (boundp 'epoch::version) epoch::version)
(string-lessp emacs-version "19")))
(error "This file was compiled for Emacs19."))
(defvar c-mode-abbrev-table nil "\
Abbrev table in use in C-mode buffers.")
(define-abbrev-table 'c-mode-abbrev-table nil)
(defvar c-mode-map nil "\
Keymap used in C mode.")
(byte-code "¼â┴ ┬├─#ê┬┼─#ê┬╞╟#ê┬╚╔#ê┬╩╦#ê┬╠═#ê┬╬╧#ê┬╨╤#ê┬╥╙#ê┬╘╒#ê┬╓╫#ç" [c-mode-map make-sparse-keymap define-key "{" electric-c-brace "}" ";" electric-c-semi "#" electric-c-sharp-sign ":" electric-c-terminator "{" c-insert-braces "" mark-c-function "" indent-c-exp "q" c-fill-paragraph "" backward-delete-char-untabify " " c-indent-command] 4)
(autoload 'c-macro-expand "cmacexp" "\
Display the result of expanding all C macros occurring in the region.
The expansion is entirely correct because it uses the C preprocessor." t)
(defvar c-mode-syntax-table nil "\
Syntax table in use in C-mode buffers.")
(byte-code "¼╦┴ ┬├─#ê┬┼╞#ê┬╟╚#ê┬╔╩#ê┬╦╩#ê┬╠╩#ê┬═╩#ê┬╬╩#ê┬╧╩#ê┬╨╩#ê┬╤╩#ê┬╥╙#ê┴ç" [c-mode-syntax-table make-syntax-table modify-syntax-entry 92 "\\" 47 ". 14" 42 ". 23" 43 "." 45 61 37 60 62 38 124 39 "\""] 4)
(defconst c-indent-level 2 "\
*Indentation of C statements with respect to containing block.")
(defconst c-brace-imaginary-offset 0 "\
*Imagined indentation of a C open brace that actually follows a statement.")
(defconst c-brace-offset 0 "\
*Extra indentation for braces, compared with other text in same context.")
(defconst c-argdecl-indent 5 "\
*Indentation level of declarations of C function arguments.")
(defconst c-label-offset -2 "\
*Offset of C label lines and case statements relative to usual indentation.")
(defconst c-continued-statement-offset 2 "\
*Extra indent for lines not starting new statements.")
(defconst c-continued-brace-offset 0 "\
*Extra indent for substatements that start with open-braces.
This is in addition to c-continued-statement-offset.")
(defconst c-auto-newline nil "\
*Non-nil means automatically newline before and after braces,
and after colons and semicolons, inserted in C code.
If you do not want a leading newline before braces then use:
(define-key c-mode-map \"{\" 'electric-c-semi)")
(defconst c-tab-always-indent t "\
*Non-nil means TAB in C mode should always reindent the current line,
regardless of where in the line point is when the TAB command is used.")
(fset 'c-mode #[nil "└ ê┴\n!ê├┼╔\n!ê╦╠!ê═P╦╧!ê╦╨!ê╤╦╥!ê╙╦╘!ê╒╦╓!ê╤╦╫!ê╪╦┘!ê┌╦█!ê▄╦▌!ê▐╦▀!êα╦ß!ê╤!Γπ!ç" [kill-all-local-variables use-local-map c-mode-map c-mode major-mode "C" mode-name c-mode-abbrev-table local-abbrev-table set-syntax-table c-mode-syntax-table make-local-variable paragraph-start "^$\\|" page-delimiter paragraph-separate paragraph-ignore-fill-prefix t indent-line-function c-indent-line indent-region-function c-indent-region require-final-newline comment-start "/* " comment-end " */" comment-column 32 comment-start-skip "/\\*+ *" comment-indent-hook c-comment-indent parse-sexp-ignore-comments run-hooks c-mode-hook] 2 "\
Major mode for editing C code.
Expression and list commands understand all C brackets.
Tab indents for C code.
Comments are delimited with /* ... */.
Paragraphs are separated by blank lines only.
Delete converts tabs to spaces as it moves back.
\\{c-mode-map}
Variables controlling indentation style:
c-tab-always-indent
Non-nil means TAB in C mode should always reindent the current line,
regardless of where in the line point is when the TAB command is used.
c-auto-newline
Non-nil means automatically newline before and after braces,
and after colons and semicolons, inserted in C code.
c-indent-level
Indentation of C statements within surrounding block.
The surrounding block's indentation is the indentation
of the line on which the open-brace appears.
c-continued-statement-offset
Extra indentation given to a substatement, such as the
then-clause of an if or body of a while.
c-continued-brace-offset
Extra indentation given to a brace that starts a substatement.
This is in addition to c-continued-statement-offset.
c-brace-offset
Extra indentation for line if it starts with an open brace.
c-brace-imaginary-offset
An open brace following other text is treated as if it were
this far to the right of the start of its line.
c-argdecl-indent
Indentation level of declarations of C function arguments.
c-label-offset
Extra indentation for line that is a label, or case or default.
Settings for K&R and BSD indentation styles are
c-indent-level 5 8
c-continued-statement-offset 5 8
c-brace-offset -5 -8
c-argdecl-indent 0 8
c-label-offset -5 -8
Turning on C mode calls the value of the variable c-mode-hook with no args,
if that value is non-nil." nil])
(fset 'c-comment-indent #[nil "└┴!½é┬ç`è┬yê└─!½ê┼╞!êiT¬Ñ└╟!¼à└╚!½â╔¬ÿbê╩╦xê┬U½ån½â┬¬àiT]*ç" [looking-at "^/\\*" 0 opoint "[ ]*}[ ]*\\($\\|/\\*\\)" search-forward "}" "^#[ ]*endif[ ]*" "^#[ ]*else[ ]*" 7 " " nil comment-column] 2])
(fset 'c-fill-paragraph #[(&optional arg) "è└yê┴┬wê├!)ë¼å╞ ╟=½┘è└yê├╚!½è╔!ê╩i╦\"¬É½â╠yê`═╬╟!╟\"ê`{)╨P╨Pîeè╙╘┬╒#ê╠yê`)}ê╓!êè╙╘!ê└yê├╪!¡é┘ -¬ä╓!)ç" [0 " " nil looking-at comment-start-skip first-line calculate-c-indent t "[ ]*/\\*.*\\*/" re-search-forward make-string 32 1 move-to-column calculate-c-indent-within-comment paragraph-start "\\|^[ ]*/\\*[ ]*$\\|^[ ]*\\*/[ ]*$\\|^[^ /*]" paragraph-separate fill-prefix search-forward "*/" move fill-paragraph arg "[ ]*\\*/" delete-indentation] 6 "\
Like \\[fill-paragraph] but handle C comments.
If point is inside a comment, the current paragraph of the comment
is filled, preserving the comment indentation or line-starting decorations." "P"])
(fset 'electric-c-brace #[(arg) "└\n¼╢l½│è├└xên)¼ë½º┼ ê╞ êcê┼ ê½è╞ ê`╚Z┼ êè ½ä Tbê╔╩!ê) ½îè bê╦╠\n!!)¬æ═V½å╬Z╦╠\n!!)ç" [nil insertpos arg " " c-auto-newline c-indent-line newline last-command-char 2 delete-char -1 self-insert-command prefix-numeric-value 127 128] 3 "\
Insert character and correct line's indentation." "P"])
(byte-code "└┴Mê┬├Mç" [c-insert-brackets #[nil "└cêè┴c)ç" [91 93] 1 nil nil] c-insert-braces #[nil "└┴!ê┬ ê├ êè┬ ê─cê├ )ç" [electric-c-brace 1 newline c-indent-line 125] 2 nil nil]] 2)
(fset 'electric-c-sharp-sign #[(arg) "è└┴xên)½ç┴├!)ç┼╞!!ç" [" " nil c-auto-newline electric-c-terminator arg self-insert-command prefix-numeric-value] 3 "\
Insert character and correct line's indentation." "P"])
(fset 'electric-c-semi #[(arg) "½ä┴\n!ç├─\n!!ç" [c-auto-newline electric-c-terminator arg self-insert-command prefix-numeric-value] 3 "\
Insert character and correct line's indentation." "P"])
(fset 'electric-c-terminator #[(arg) "└`¼φl½Ωè─yê┼└wêg╞U«┤╚=½ö╔╩!¼Åè╦└wê┼└wê` W)«Ü╠ ê═` \"╧8«è╨8«ä╤8))¼ªcê╥ ê½Ä╘ ¼è╒ ê`╓Z╥ êè\n½ä\nTbê╫╪!ê)\n½îè\nbê┘┌!!)¬à┘┌!!*ç" [nil end insertpos arg 0 " " 35 last-command-char 58 looking-at "case[ '/(]" "a-zA-Z0-9_$" beginning-of-defun parse-partial-sexp pps 3 4 5 c-indent-line c-auto-newline c-inside-parens-p newline 2 delete-char -1 self-insert-command prefix-numeric-value] 3 "\
Insert character and correct line's indentation." "P"])
(fset 'c-inside-parens-p #[nil "└┴┬Åç" [nil (byte-code "èî`└ ê`}êdbê┴`┬├#«üef─U*ç" [beginning-of-defun scan-lists -1 1 40] 4) ((error))] 3])
(fset 'c-indent-command #[(&optional whole-exp) "½╡┴ ┬ëè½â╟yêè╚yê`)`W½î╔╚!ê`╩┬wê¬o)V¡å╦╠$+ç¼îè═┬xên)¼â╬ ç┴ ç" [whole-exp c-indent-line nil end beg shift-amt c-tab-always-indent 0 1 forward-sexp " \n" indent-code-rigidly "#" " " insert-tab] 5 "\
Indent current line as C code, or in some cases insert a tab character.
If c-tab-always-indent is non-nil (the default), always indent current line.
Otherwise, indent the current line only if point is at the left margin
or in the line's indentation; otherwise insert a tab.
A numeric argument, regardless of its value,
means indent rigidly all the lines of the expression starting after point
so that this line becomes properly indented.
The relative indentation among the lines of the expression are preserved." "P"])
(fset 'c-indent-line #[nil "└┴!┴ëëd`Z╟yê`┴=½ç╚ é¬ ╔=½å╩ ¬²╦╠!½à╟¬≤═┴wê<½à@╦╬!¼É╦╧!½ûè╨╤!ê╦╥!)½ï╤\\]¬┼╦╘!½É╦╒!¼ïè╓ ê╚ )¬░╦╫!½æè╪ )½ïè╪ ê╚ )¬Üg┘U½ëZ¬îg█U½ç\\═┴wêiZë╟U½Äd\nZ`V½¢d\nZbê¬ö`|êjêd\nZ`V½àd\nZbê-ç" [calculate-c-indent nil pos case-fold-search shift-amt beg indent 0 current-indentation t calculate-c-indent-within-comment looking-at "[ ]*#" " " "case[ '/(]" "[A-Za-z]" forward-sexp 1 ":" c-label-offset "else\\b" "else\\s_" c-backward-to-start-of-if "while\\b" c-backward-to-start-of-do 125 c-indent-level 123 c-brace-offset] 7 "\
Indent current line as C code.
Return the amount the indentation changed by."])
(fset 'calculate-c-indent #[(&optional parse-start) "è└yê`┴ëë½åbê¬â╟ ê`W½Å`╚`└#ëA@¬l╔8¼à╩8½å╩8éw\n¼┼bê╦┴wêg╠U½ä└éw═«üe!êè╬╧┴╨#ê╤╥!½£╤╙!½ù└òSbê╘╒!ê`W½ëg╓>¼ä¬ü└)éw\nf╠U¼ê\nTbêiéwbê═\n!êh╪=¼ûh┘=½ª`┌Zf█=¼ë`┌Zfz▄>½òh╪=½ç▌uê▐\n!ê└yê═\n!ê¬Ph▀>¼¼èbê╦┴wêgαU)¼₧▐\n!ê!ièbê╦┴wêg)╠=½ä\"¬ü└\\\\¬ⁿ\nbêè╒uê└#Σ┴wê╤σ!½¿gµU½à╒yê¬mgτU½ï┌uêΦΘ┴╨#ê¬]è┴ê`#)ΦΩ!ê¬O`W¡Ä#`V½çδ ,Z¬üi*«½n½ì-└U½ç.!\\¬é-╦┴xên½â└¬é/h≡=½ä╘▌!êδ \\\\-ç" [0 nil containing-sexp state case-fold-search indent-point parse-start beginning-of-defun parse-partial-sexp 3 4 " " 123 c-backward-to-noncomment re-search-backward "^[^ \n#]" move looking-at "\\sw\\|\\s_" "[^\"\n=]*(" forward-sexp 1 (44 59) c-argdecl-indent 44 58 2 39 (119 95) -1 c-backward-to-start-of-continued-exp (nil 44 59 125 123) 125 c-continued-statement-offset c-continued-brace-offset colon-line-end " \n" "#\\|/\\*\\|case[ \n'/(].*:\\|[a-zA-Z0-9_$]*:" 35 47 search-forward "*/" ":" current-indentation c-label-offset c-indent-level c-brace-offset c-brace-imaginary-offset 41] 5 "\
Return appropriate indentation for current line as C code.
In usual case returns an integer: the column to indent to.
Returns nil if line starts inside a string, t if in a comment."])
(fset 'calculate-c-indent-within-comment #[(&optional after-star) "└ëè├yê─└wêg┼U╞└xê`├yê─└wê½ë╚╔!½ä╩╦!ê╩╠\n═#½î ½ë¼à├öTbê╚╬!½ëh┼U½äiT¬üi+ç" [nil star-start end 0 " " 42 " \n" after-star looking-at "\\*" re-search-forward "\\*[ ]*" "/\\*[ ]*" t "[ ]*$"] 4 "\
Return the indentation amount for line inside a block comment.
Non-nil arg AFTER-STAR means, if lines in the comment have a leading star,
return the indentation of the text that would follow this star."])
(byte-code "└┴Mê┬├Mç" [c-backward-to-noncomment #[(lim) "└ë ?¡╩├xê``┼\\Y½Æè╞uê╟╚!)½ê╔╩╦#ê¬]`X«¥è╠yê`┼Zf═=½ê╬uê╠yê¬m╧└wê╟╨!)?ë¼7╠yê¬2*ç" [nil stop opoint " \n" lim 2 -2 looking-at "\\*/" search-backward "/*" move 0 92 -1 " " "#"] 5] c-backward-to-start-of-continued-exp #[(lim) "h└>½ä┴┬!ê├yê`X½äTbê┼╞wç" [(41 34) forward-sexp -1 0 lim " " nil] 2]] 2)
(fset 'c-backward-to-start-of-if #[(&optional limit) "¼çè┴ ê`)┬├o?¡¬╞U?¡ñ╟┬!ê╚╔!½àT¬h╚╩!½àS¬^`W½Y╞bê¬R*ç" [limit beginning-of-defun 1 nil case-fold-search if-level 0 backward-sexp looking-at "else\\b" "if\\b"] 2 "\
Move to the start of the last ``unbalanced'' if."])
(fset 'c-backward-to-start-of-do #[(&optional limit) "¼çè┴ ê`)┬`├¼╔`├╚╔Åê¼╗╩╦!½ä╠¬▓è═╬!ê¼àh╧U«ô╨╤┬½êh╧U¼â╥¬ü╬$)½ä╙¬è├`W½é╙)¬4╠=½â┬¬äbê├+ç" [limit beginning-of-defun t nil done startpos first next-start (backward-sexp 1) ((error (byte-code "└└ç" [fail done] 1))) looking-at "do\\b" succeed forward-sexp 1 125 search-forward ";" 2 fail] 6 "\
If point follows a `do' statement, move to beginning of it and return `t'.
Otherwise return `nil' and don't move point."])
(fset 'mark-c-function #[nil "└`!ê┴ ê└`!ê┬ ê├ ê─ ç" [push-mark end-of-defun beginning-of-defun backward-paragraph zmacs-activate-region] 2 "\
Put mark at end of C function, point at beginning." nil])
(fset 'indent-c-exp #[(&optional endpos) "└C`½ÿ└è┼uê╞ ê`)î`}ê└╟╚Å*¬ü`C └\n└└└└└└└└└└└╓è╪┼!ê)è`┌è└ê`)▄#½á▌`└ë%▀8?¡àα8?)½åß ê╓yê*è└m?à₧½à`W¬â?à₧└¼╧m½å▄ë¼╞▌`└ê`└ë%ë@AA@½ÉAA@╓Y½çAA@Γ8½âπ ê▀8½à┼yê¬3▄ë½1½½╓W½ÑΣ └C\"Σ └C\" TTσ¢σ8Táê¬U?¡ä╓Xëäç σ8V½É A A Së¬iU¼â└W½Æ└ B└ B Të¬i @¼æ A@«çè╪µ!ê`)áê┼yêτ└wêläç @½Θ @╓Y½π @fΦU¼å @¬∞èΘΩ!gΦUΘδ!∞\n!êhφ>¼ÿε @!ê/i½ä0¬ü╓\\\\¬í½è±\n!ê≥ ¬ô½ï≤\n!½å≥ ¬ä @)¬ù⌠ @½à @[¬ü\n!5 5ëáê)Θ÷!¼ÉΘ≈!½öè╪┼!êΘ°!)½ë┼9\\]g·U½ç;ZgΦU½ç<\\l½â╓iU¼Ég²U¼ï`╓yê`|êjêΘ!äç `┌è└ê`)▄#½á▌`└ë%▀8?¡àα8?)½åß ê╓yê)éç .ç" [nil indent-stack opoint endpos funbeg 1 beginning-of-defun (byte-code "è└┴!ê`)ç" [backward-up-list 1] 2) ((error (byte-code "`ç" [funbeg opoint] 1))) contain-stack case-fold-search restart outer-loop-done inner-loop-done state ostate this-indent last-sexp at-else at-brace at-while last-depth 0 next-depth forward-sexp beg re-search-forward comment-start-skip t parse-partial-sexp new-state 3 5 indent-for-comment 4 c-indent-line append 6 -1 " " 123 looking-at "else\\W" "while\\b" c-backward-to-noncomment (nil 44 59 125 58 123) c-backward-to-start-of-continued-exp c-continued-statement-offset c-continued-brace-offset c-backward-to-start-of-if current-indentation c-backward-to-start-of-do calculate-c-indent val "case[ '/(]" "[A-Za-z]" ":" c-label-offset 125 c-indent-level c-brace-offset 35] 7 "\
Indent each line of the C grouping following point.
If optional arg ENDPOS is given, indent each line, stopping when
ENDPOS is encountered." nil])
(fset 'c-indent-region #[(start end) "èbê┴\n!n½ål¼â─ ê┼!ê╞ëô*ç" [start copy-marker end endmark c-indent-line indent-c-exp nil] 3])